import  request from '@/utils/request'

export default {
  //添加小节
  addVideo(video) {
    return request({
      url: '/edu/video/addVideo',
      method: 'post',
      data:video
    })
  },
  //更新小节
  updateVideo(video) {
    return request({
      url: '/edu/video/updateVideo',
      method: 'post',
      data:video
    })
  },
  //获取小节信息
  getVideo(videoId) {
    return request({
      url: '/edu/video/getVideoInfo/' + videoId,
      method: 'get'
    })
  },
  //删除小节
  deleteVideo(videoId) {
    return request({
      url: '/edu/video/' + videoId,
      method: 'delete'
    })
  },
  //删除阿里云中的视频
  removeAliYunVideo(id,url) {
    return request({
      url: url +'/eduvod/video/removeAliYunVideo/' + id,
      method: 'delete'
    })
  }
}
